#include "Tree.h"


Tree::Tree(int newX,int newY,int newZ,GLUquadricObj *newP, GLint texture_id):Shape(texture_id)
{
	this->x = newX;
	this->y = newY;
	this->z = newZ;
	this->p = newP;
	this->Angle.xAngle = 0;
	this->Angle.yAngle = 0;
	this->Angle.zAngle = 0;
}

void Tree::DrawHip()
{
	glPushMatrix();	 
	glColor3f(134/255,34/255,34/255);


	 glTranslatef(this->x,this->y,this->z);
	 glRotatef(90,1,0,0);
	 glRotatef(this->Anglecord.angle, this->Anglecord.xAngle,this->Anglecord.yAngle,this->Anglecord.zAngle);
	 gluCylinder(this->p,4,4,13,25,12);
	glPopMatrix();
	glPushMatrix();	 
	 glTranslatef(this->x,this->y+5,this->z);
	glColor3f(0.1, 1, 0.1);
	 glRotatef(-90,1,0,0);
	 gluCylinder(this->p,5,0,13,12,12);
	 glutPostRedisplay();
	glPopMatrix();
}

Tree::~Tree(void)
{
}
